#include<bits/stdc++.h>
#define ll long long
using namespace std;
const ll mod=998244353;
ll n,m,a,b;
int main()
{
    freopen("clown.in","r",stdin);
    freopen("clown.out","w",stdout);
    cin>>m>>n>>a>>b;
    cout<<((((a*b%mod)*(a*b%mod)%mod)*(a*b%mod)-3*(a*(a-1)%mod)*(b*b%mod)-(a*b%mod)*(b*b%mod)+(a*b%mod)*((b-1)*(b-2)%mod))%mod+mod)%mod<<'\n';
    return 0;
}
